import request from 'umi-request';
export async function fetchRoleList(params = {}) {
  return request('/amaidan-sys-user/merchants/role/list', {
    method: 'POST',
    data: params,
  });
}

export async function deleteRole(params = {}) {
  return request('/amaidan-sys-user/merchants/role/delete', {
    method: 'POST',
    data: params,
  });
}

export async function saveOrUpdateRole(params = {}) {
  return request('/amaidan-sys-user/merchants/role/saveOrUpdate', {
    method: 'POST',
    data: params,
  });
}

export async function searchRole(params = {}) {
  return request('/amaidan-sys-user/merchants/role/get', {
    method: 'POST',
    data: params,
  });
}

export async function rolePermission(params = {}) {
  return request('/amaidan-sys-user/merchants/role/batchRolePermissionRef', {
    method: 'POST',
    data: params,
  });
}
